<meta charset="UTF-8">
<script type="text/javascript">
function formatStatus(value,row,index){
	if(value==0){
		return "未处理";
	}else{
		return "已处理";
	}
}

function query2(formId) {
	var serializeObj = {};
	var array = $('#' + formId).serializeArray();
	$(array).each(
			function() {
				if (serializeObj[this.name]) {
					if ($.isArray(serializeObj[this.name])) {
						serializeObj[this.name].push(this.value);
					} else {
						serializeObj[this.name] = [serializeObj[this.name], this.value ];
					}
				} else {
					serializeObj[this.name] = this.value;
				}
			});
	$('#datagrid2').datagrid('load',serializeObj); 
}
 
 $(function(){
	 $('#province').combobox({   
      /*    url:'cityinfo/findAllProvince',   
         editable:false, //不可编辑状态  
         cache: false,  
         //panelHeight: '150',//自动高度适合  
         valueField:'postcode',     
         textField:'cityName', */
         loadFilter:function(data){
			    data.unshift({postcode:'0',cityName:'全国'});
			    return data;
		      }
      }); 
 });
</script>
<table
	     class="easyui-datagrid"   
	     id="datagrid2"   
         url="${base}/intention/list?type=101"
         toolbar="#searchtool2,#toolbar2" 
         pagination="true"
         rownumbers="true" 
         fitColumns="true"
         singleSelect="true"
         data-options="fit:false,border:false,pageSize:20" >  
    <thead>  
        <tr>
            <th field="id" checkbox="true"></th>  
            <th field="intro" width="60px">标题</th>
            <th field="industryName" width="50px">行业</th>
            <th field="districtName" width="50px">地区</th>
            <th field="userName" width="40px">发布人</th> 
            <th field="phone" width="50px">用户帐号</th>     
            <th field="amount" width="40px">金额（万）</th>
            <th field="modeName" width="40px">方式</th>     
            <th field="status" width="40px" formatter="formatStatus">处理状态</th>
            <th field="auth" width="30px">认证方式</th>    
            <th field="typeName" width="40px">身份类型</th>     
            <th field="pushTime" width="40px">发布时间</th>
            <th field="content" width="100px">描述</th>
            <th field="handlePerson" width="40px">操作员</th>  
            <th field="handleTime" width="40px">操作时间</th>  
            <th field="note" width="80px">备注</th> 
            <th data-options="field:'userId',width:85,align:'center',hidden:true"></th> 
            <th data-options="field:'phone',width:85,align:'center',hidden:true"></th> 
        </tr>  
    </thead>  
</table>  
<div id="searchtool2" style="padding:5px">
    <form id="searchForm2" method="post">
     <span>所属行业:</span>
	 <input id="industry" class="easyui-combobox" name="industry" data-options="valueField:'id',editable:false,textField:'industryName',url:'${base}/industry/queryAll'" /> 
	 <span>所在地区:</span>
	 <input id="province" class="easyui-combobox" name="province" data-options="valueField:'postcode',textField:'cityName',url:'${base}/cityinfo/findAllProvince'" />
	 <span>处理状态:</span>
	 <select id="status" class="easyui-combobox" name="status" style="width:200px;"> 
	    <option value="">全部</option>     
	    <option value="0">未处理</option>   
	    <option value="1">已处理</option>   
	    <option value="2">已删除</option>   	    
	</select>
	<span>起始时间:</span>
	<input id="startDate" name="startDate" type="text" class="easyui-datebox" />
	<span>截止时间:</span>
	<input id="endDate" name="endDate" type="text" class="easyui-datebox" />
	<span>关键字:</span>
	<input type="text" id="keyWord" name="keyWord" data-options="prompt:'标题/姓名/用户帐号'" class="easyui-textbox" size=20 />  
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" onclick="javascript:query2('searchForm2');">搜索</a>
    </form>  
</div>  
<div id="toolbar2">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:doSelIntention();">选择</a>
</div>	
	<!--编辑弹框结束-->